<div class="modal-content" style="width:800px;">
	<div class="modal-header">
	    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	    <h4 class="modal-title" id="myModalLabel">新增兑换券/编辑兑换券</h4>
	</div>
	<div class="modal-body popfrm">
        <form class="form-horizontal" id="editForm" name="editForm" role="form">
        	<input type="hidden" id="id" name="id" value="{{data.id}}"></input>
        	<input type="hidden" id="goods_label_type" name="goods_label_type" value=""></input>
             <div class="form-group">
                 <label for="firstname" class="pop-left"><span class="redstar">*</span>兑换券名称：</label>
                 <div class="pop-right">
                     <input type="text" id="coupon_name" name="coupon_name" placeholder="最大输入12个字" value="{{data.coupon_name}}" class="form-control" datatype="*1-12" nullmsg="最大输入12个字" errormsg="最大输入12个字">
                     <span class="Validform_checktip"></span>
                 </div>
             </div>
             <div class="form-group">
                 <label for="firstname" class="pop-left"><span class="redstar">*</span>兑换券数量：</label>
                 <div class="pop-right">
                     <input type="text" id="coupon_num" name="coupon_num" placeholder="输入1~9999" value="{{data.total_num}}" class="form-control" datatype="/^[1-9][0-9]{0,3}$/" nullmsg="输入1~9999" errormsg="输入1~9999">
                     <span class="Validform_checktip"></span>
                 </div>
             </div>

        	<div class="form-group">
            	<label for="lastname" class="pop-left"><span class="redstar">*</span>兑换券关联商品：</label>
            	<div class="pop-right">
            	<select class="form-control" id="goods_id" name="goods_id" datatype="*" nullmsg="兑换券关联商品不能为空">
            		<option value="">请选择</option>
            	</select>
            	<span class="Validform_checktip"></span>
            	</div>
        	</div>
        	<div class="form-group" id="skuid_div">
            	<label for="lastname" class="pop-left"><span class="redstar">*</span>配送次数：</label>
            	<div class="pop-right">
            		<select class="form-control" id="skuid" name="skuid" datatype="*" nullmsg="配送次数不能为空" errormsg="配送次数不能为空">
            			<option value="">请选择</option>
            		</select>
            		<span class="Validform_checktip"></span>
            	</div>
        	</div>
       		<div class="form-group">
           		<label for="lastname" class="pop-left"><span class="redstar">*</span>商品价格：</label>
           		<div class="pop-right" id="goods_price" name="goods_price">0</div>
       		</div>
       		<div class="form-group">
            	<label for="lastname" class="pop-left"><span class="redstar">*</span>使用有效期：</label>
            	<div class="pop-right">
            		<input type="text" class="form-control fl w130" id="valid_begintime" name="valid_begintime" value="{{dateFormat(data.valid_begintime,'yyyy-MM-dd')}}" data-date-format="yyyy-mm-dd" readonly="readonly"  onFocus="if($('#valid_begintime').val()==''){$('#valid_endtime').val('')};WdatePicker({minDate:'{{dateFormat(data.curDate,'yyyy-MM-dd')}}',maxDate:'#F{$dp.$D(\'valid_endtime\')||\'\'}'})" datatype="dateCompare">
                    <span class="fl w40">到</span>
                    <input type="text" class="form-control fl w130" id="valid_endtime" name="valid_endtime" value="{{dateFormat(data.valid_endtime,'yyyy-MM-dd')}}" data-date-format="yyyy-mm-dd" readonly="readonly" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'valid_begintime\')||\'\'}'})" datatype="dateCompare">
                    <span class="Validform_checktip"></span>
            	</div>
        	</div>
        	<div class="form-group">
				<label class="pop-left">背景图：</label>
				<div class="col-sm-3">
					<input type="file" name="file" class="fm-fileinput1" id="fileinput1" multiple="multiple">
				</div>
				<div class="col-sm-5">
					<input type="hidden"  name="coupon_logo" id="coupon_logo" value="{{data.coupon_logo}}"/>
							{{if isEmpty(data.coupon_logo)}}
								<img src="../images/default.jpg" style="height: 50px;width: 100%;"/>
							{{else}}
								<img src="{{imgRoot}}{{data.coupon_logo}}" style="height: 50px;width: 100%;"/>
							{{/if}}
					</div>
					<div class="col-sm-10">
						<span class="col-sm-8 floatR" style="color: #aaaaaa;padding-left:0;">建议上传规格为650*108</span>
					</div>
			</div>
        	
        </form>
     </div>
     <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
         <button type="button" class="btn btn-primary editSubmit">提交</button>
     </div>
</div><!-- /.modal-content -->